

<%if facebook_user-%>
<h1>Registar utilizador do facebook</h1>
<%else-%>
<h1>Registar novo utilizador</h1>
<%end-%>
<% form_for(@user) do |f| %>
<%= f.error_messages %>

<p>
    <%= f.label :first_name%>
    <br/>
    <%= f.text_field :first_name%>
</p>

<p>
    <%= f.label :last_name%>
    <br/>
    <%= f.text_field :last_name%>
</p>


<p>
    <%= f.label :email %>
    <br/>
    <%= f.text_field :email%>
</p>

<%unless facebook_user-%>

<p>
    <%= f.label :password %>
    <br/>
    <%= f.password_field :password%>
</p>


<p>
    <%= f.label :password_confirmation %>
    <br/>
    <%= f.password_field :password_confirmation%>
</p>

<%end%>
<p>
    <%= f.submit 'Registar' %>
</p>
<% end %>
<%= link_to 'Back', users_path %>